#!/bin/bash
#

echo "================================================================="
echo "Create ISO: begin"
USAGE="Usage: $0 label directory iso-name"

LABEL=$1
DIRECTORY=$2
ISO=$3

if [ ! -n $LABEL ] 
then
    echo $USAGE
    exit 1
fi

if [ ! -n $DIRECTORY ] 
then
    echo $USAGE
    exit 1
fi

if [ ! -n $ISO ] 
then
    echo $USAGE
    exit 1
fi

echo "mkisofs -V '$LABEL' -r $DIRECTORY > $ISO"
mkisofs -V '$LABEL' -r $DIRECTORY > $ISO

echo "Create ISO: done"
echo "================================================================="
exit 0
